home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-28 | 116.8 KB | 2,707 lines |
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- NNNNaaaammmmeeee
- mtools - utilities to access DOS disks in Unix.
-
- IIIInnnnttttrrrroooodddduuuuccccttttiiiioooonnnn
- Mtools is a public domain collection of tools to allow Unix
- systems to manipulate MS-DOS files: read, write, and move
- around files on an MS-DOS filesystem (typically a floppy
- disk). Where reasonable, each program attempts to emulate
- the MS-DOS equivalent command. However, unnecessary
- restrictions and oddities of DOS are not emulated. For
- instance, it is possible to move subdirectories from one
- subdirectory to another.
-
- Mtools is sufficient to give access to MS-DOS filesystems.
- For instance, commands such as mdir a: work on the a: floppy
- without any preliminary mounting or initialization (assuming
- the default `/etc/mtools.conf' works on your machine). With
- mtools, one can change floppies too without unmounting and
- mounting.
-
- WWWWhhhheeeerrrreeee ttttoooo ggggeeeetttt mmmmttttoooooooollllssss
- Mtools can be found at the following places (and their
- mirrors):
-
- hhhhttttttttpppp::::////////mmmmttttoooooooollllssss....lllliiiinnnnuuuuxxxx....lllluuuu////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
- ffffttttpppp::::////////wwwwwwwwwwww....ttttuuuuxxxx....oooorrrrgggg////ppppuuuubbbb////kkkknnnnaaaaffffffff////mmmmttttoooooooollllssss////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
- ffffttttpppp::::////////ssssuuuunnnnssssiiiitttteeee....uuuunnnncccc....eeeedddduuuu////ppppuuuubbbb////LLLLiiiinnnnuuuuxxxx////uuuuttttiiiillllssss////ddddiiiisssskkkk----mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
-
-
-
- Before reporting a bug, make sure that it has not yet been
- fixed in the Alpha patches which can be found at:
-
- hhhhttttttttpppp::::////////mmmmttttoooooooollllssss....lllliiiinnnnuuuuxxxx....lllluuuu////
- ffffttttpppp::::////////wwwwwwwwwwww....ttttuuuuxxxx....oooorrrrgggg////ppppuuuubbbb////kkkknnnnaaaaffffffff////mmmmttttoooooooollllssss
-
-
-
- These patches are named mtools-_v_e_r_s_i_o_n-_d_d_m_m.taz, where
- version stands for the base version, _d_d for the day and _m_m
- for the month. Due to a lack of space, I usually leave only
- the most recent patch.
-
- There is an mtools mailing list at mtools @ tux.org .
- Please send all bug reports to this list. You may subscribe
- to the list by sending a message with 'subscribe mtools @
- tux.org' in its body to majordomo @ tux.org . (N.B. Please
- remove the spaces around the "@" both times. I left them
- there in order to fool spambots.) Announcements of new
- mtools versions will also be sent to the list, in addition
- to the linux announce newsgroups. The mailing list is
- archived at http://www.tux.org/hypermail/mtools/latest
-
-
-
- Page 1 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- CCCCoooommmmmmmmoooonnnn ffffeeeeaaaattttuuuurrrreeeessss ooooffff aaaallllllll mmmmttttoooooooollllssss ccccoooommmmmmmmaaaannnnddddssss
- OOOOppppttttiiiioooonnnnssss aaaannnndddd ffffiiiilllleeeennnnaaaammmmeeeessss
- MS-DOS filenames are composed of a drive letter followed by
- a colon, a subdirectory, and a filename. Only the filename
- part is mandatory, the drive letter and the subdirectory are
- optional. Filenames without a drive letter refer to Unix
- files. Subdirectory names can use either the '/' or '\'
- separator. The use of the '\' separator or wildcards
- requires the names to be enclosed in quotes to protect them
- from the shell. However, wildcards in Unix filenames should
- not be enclosed in quotes, because here we wwwwaaaannnntttt the shell to
- expand them.
-
- The regular expression "pattern matching" routines follow
- the Unix-style rules. For example, `*' matches all MS-DOS
- files in lieu of `*.*'. The archive, hidden, read-only and
- system attribute bits are ignored during pattern matching.
-
- All options use the - (minus) as their first character, not
- / as you'd expect in MS-DOS.
-
- Most mtools commands allow multiple filename parameters,
- which doesn't follow MS-DOS conventions, but which is more
- user-friendly.
-
- Most mtools commands allow options that instruct them how to
- handle file name clashes. See section name clashes, for more
- details on these. All commands accept the -V flags which
- prints the version, and most accept the -v flag, which
- switches on verbose mode. In verbose mode, these commands
- print out the name of the MS-DOS files upon which they act,
- unless stated otherwise. See section Commands, for a
- description of the options which are specific to each
- command.
-
- DDDDrrrriiiivvvveeee lllleeeetttttttteeeerrrrssss
- The meaning of the drive letters depends on the target
- architectures. However, on most target architectures, drive
- A is the first floppy drive, drive B is the second floppy
- drive (if available), drive J is a Jaz drive (if available),
- and drive Z is a Zip drive (if available). On those systems
- where the device name is derived from the SCSI id, the Jaz
- drive is assumed to be at Scsi target 4, and the Zip at Scsi
- target 5 (factory default settings). On Linux, both drives
- are assumed to be the second drive on the Scsi bus
- (/dev/sdb). The default settings can be changes using a
- configuration file (See section Configuration).
-
- CCCCuuuurrrrrrrreeeennnntttt wwwwoooorrrrkkkkiiiinnnngggg ddddiiiirrrreeeeccccttttoooorrrryyyy
- The mcd command (`mcd') is used to establish the device and
- the current working directory (relative to the MS-DOS
- filesystem), otherwise the default is assumed to be A:/.
-
-
-
- Page 2 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- However, unlike MS-DOS, there is only one working directory
- for all drives, and not one per drive.
-
- VVVVFFFFAAAATTTT----ssssttttyyyylllleeee lllloooonnnngggg ffffiiiilllleeee nnnnaaaammmmeeeessss
- This version of mtools supports VFAT style long filenames.
- If a Unix filename is too long to fit in a short DOS name,
- it is stored as a VFAT long name, and a companion short name
- is generated. This short name is what you see when you
- examine the disk with a pre-7.0 version of DOS.
- The following table shows some examples of short names:
-
- LLLLoooonnnngggg nnnnaaaammmmeeee MMMMSSSS----DDDDOOOOSSSS nnnnaaaammmmeeee RRRReeeeaaaassssoooonnnn ffffoooorrrr tttthhhheeee cccchhhhaaaannnnggggeeee
- ------------------------------------ ---------------------------------------- ------------------------------------------------------------------------------------
- tttthhhhiiiissssiiiissssaaaatttteeeesssstttt TTTTHHHHIIIISSSSIIIISSSS~~~~1111 ffffiiiilllleeeennnnaaaammmmeeee ttttoooooooo lllloooonnnngggg
- aaaallllaaaaiiiinnnn....kkkknnnnaaaaffffffff AAAALLLLAAAAIIIINNNN~~~~1111....KKKKNNNNAAAA eeeexxxxtttteeeennnnssssiiiioooonnnn ttttoooooooo lllloooonnnngggg
- pppprrrrnnnn....ttttxxxxtttt PPPPRRRRNNNN~~~~1111....TTTTXXXXTTTT PPPPRRRRNNNN iiiissss aaaa ddddeeeevvvviiiicccceeee nnnnaaaammmmeeee
- ....aaaabbbbcccc AAAABBBBCCCC~~~~1111 nnnnuuuullllllll ffffiiiilllleeeennnnaaaammmmeeee
- hhhhooootttt++++ccccoooolllldddd HHHHOOOOTTTT____CCCCOOOO~~~~1111 iiiilllllllleeeeggggaaaallll cccchhhhaaaarrrraaaacccctttteeeerrrr
-
-
-
- As you see, the following transformations happen to derive
- a short name:
-
- * Illegal characters are replaced by underscores. The
- illegal characters are ;+=[]',\"*\\<>/?:|.
-
- * Extra dots, which cannot be interpreted as a main
- name/extension separator are removed
-
- * A ~_n number is generated,
-
- * The name is shortened so as to fit in the 8+3
- limitation
-
- The initial Unix-style file name (whether long or short) is
- also called the _p_r_i_m_a_r_y name, and the derived short name is
- also called the _s_e_c_o_n_d_a_r_y name.
-
- Example:
-
- mmmmccccooooppppyyyy ////eeeettttcccc////mmmmoooottttdddd aaaa::::RRRReeeeaaaallllllllyyyylllloooonnnnggggnnnnaaaammmmeeee
-
- Mtools creates a VFAT entry for Reallylongname, and uses
- REALLYLO as a short name. Reallylongname is the primary
- name, and REALLYLO is the secondary name.
-
- mmmmccccooooppppyyyy ////eeeettttcccc////mmmmoooottttdddd aaaa::::mmmmoooottttdddd
-
- Motd fits into the DOS filename limits. Mtools doesn't need
- to derivate another name. Motd is the primary name, and
- there is no secondary name.
-
-
-
- Page 3 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- In a nutshell: The primary name is the long name, if one
- exists, or the short name if there is no long name.
-
- Although VFAT is much more flexible than FAT, there are
- still names that are not acceptable, even in VFAT. There are
- still some illegal characters left (\"*\\<>/?:|), and device
- names are still reserved.
-
- UUUUnnnniiiixxxx nnnnaaaammmmeeee LLLLoooonnnngggg nnnnaaaammmmeeee RRRReeeeaaaassssoooonnnn ffffoooorrrr tttthhhheeee cccchhhhaaaannnnggggeeee
- ------------------------------------ ---------------------------------------- ------------------------------------------------------------------------------------
- pppprrrrnnnn pppprrrrnnnn----1111 PPPPRRRRNNNN iiiissss aaaa ddddeeeevvvviiiicccceeee nnnnaaaammmmeeee
- aaaabbbb::::cccc aaaabbbb____cccc----1111 iiiilllllllleeeeggggaaaallll cccchhhhaaaarrrraaaacccctttteeeerrrr
-
-
-
- As you see, the following transformations happen if a long
- name is illegal:
-
- * Illegal characters are replaces by underscores,
-
- * A -_n number is generated,
-
- NNNNaaaammmmeeee ccccllllaaaasssshhhheeeessss
- When writing a file to disk, its long name or short name may
- collide with an already existing file or directory. This may
- happen for all commands which create new directory entries,
- such as mcopy, mmd, mren, mmove, mwrite and mread. When a
- name clash happens, mtools asks you what it should do. It
- offers several choices:
-
- overwrite
- Overwrites the existing file. It is not possible to
- overwrite a directory with a file.
-
- rename
- Renames the newly created file. Mtools prompts for the
- new filename
-
- autorename
- Renames the newly created file. Mtools chooses a name
- by itself, without prompting
-
- skip
- Gives up on this file, and moves on to the next (if
- any)
-
- To chose one of these actions, type its first letter at the
- prompt. If you use a lower case letter, the action only
- applies for this file only, if you use an upper case letter,
- the action applies to all files, and you won't be prompted
- again.
-
-
-
-
- Page 4 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- You may also chose actions (for all files) on the command
- line, when invoking mtools:
-
- -o Overwrites primary names by default.
-
- -O Overwrites secondary names by default.
-
- -r Renames primary name by default.
-
- -R Renames secondary name by default.
-
- -a Autorenames primary name by default.
-
- -A Autorenames secondary name by default.
-
- -s Skip primary name by default.
-
- -S Skip secondary name by default.
-
- -m Ask user what to do with primary name.
-
- -M Ask user what to do with secondary name.
-
- Note that for command line switches lower/upper
- differentiates between primary/secondary name whereas for
- interactive choices, lower/upper differentiates between
- just-this-time/always.
-
- The primary name is the name as displayed in Windows 95 or
- Windows NT: i.e. the long name if it exists, and the short
- name otherwise. The secondary name is the "hidden" name,
- i.e. the short name if a long name exists.
-
- By default, the user is prompted if the primary name
- clashes, and the secondary name is autorenamed.
-
- If a name clash occurs in a Unix directory, mtools only asks
- whether to overwrite the file, or to skip it.
-
- CCCCaaaasssseeee sssseeeennnnssssiiiittttiiiivvvviiiittttyyyy ooooffff tttthhhheeee VVVVFFFFAAAATTTT ffffiiiilllleeeessssyyyysssstttteeeemmmm
- The VFAT filesystem is able to remember the case of the
- filenames. However, filenames which differ only in case are
- not allowed to coexist in the same directory. For example if
- you store a file called LongFileName on a VFAT filesystem,
- mdir shows this file as LongFileName, and not as
- Longfilename. However, if you then try to add LongFilename
- to the same directory, it is refused, because case is
- ignored for clash checks.
-
- The VFAT filesystem allows to store the case of a filename
- in the attribute byte, if all letters of the filename are
- the same case, and if all letters of the extension are the
-
-
-
- Page 5 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- same case too. Mtools uses this information when displaying
- the files, and also to generate the Unix filename when
- mcopying to a Unix directory. This may have unexpected
- results when applied to files written using an pre-7.0
- version of DOS: Indeed, the old style filenames map to all
- upper case. This is different from the behavior of the old
- version of mtools which used to generate lower case Unix
- filenames.
-
- hhhhiiiigggghhhh ccccaaaappppaaaacccciiiittttyyyy ffffoooorrrrmmmmaaaattttssss
- Mtools supports a number of formats which allow to store
- more data on disk as usual. Due to different operating
- system abilities, these formats are not supported on all
- OS'es. Mtools recognizes these formats transparently where
- supported.
-
- In order to format these disks, you need to use an operating
- system specific tool. For Linux, suitable floppy tools can
- be found in the fdutils package at the following locations~:
-
- ftp://www.tux.org/pub/knaff/fdutils/.
- ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/fdutils-*
-
-
-
- See the manpages included in that package for further
- detail: Use superformat to format all formats except XDF,
- and use xdfcopy to format XDF.
-
- MMMMoooorrrreeee sssseeeeccccttttoooorrrrssss
- The oldest method of fitting more data on a disk is to use
- more sectors and more cylinders. Although the standard
- format uses 80 cylinders and 18 sectors (on a 3 1/2 high
- density disk), it is possible to use up to 83 cylinders (on
- most drives) and up to 21 sectors. This method allows to
- store up to 1743K on a 3 1/2 HD disk. However, 21 sector
- disks are twice as slow as the standard 18 sector disks
- because the sectors are packed so close together that we
- need to interleave them. This problem doesn't exist for 20
- sector formats.
-
- These formats are supported by numerous DOS shareware
- utilities such as fdformat and vgacopy. In his infinite
- hybris, Bill Gate$ believed that he invented this, and
- called it `DMF disks', or `Windows formatted disks'. But in
- reality, it has already existed years before! Mtools
- supports these formats on Linux, on SunOs and on the DELL
- Unix PC.
-
- BBBBiiiiggggggggeeeerrrr sssseeeeccccttttoooorrrrssss
- By using bigger sectors it is possible to go beyond the
- capacity which can be obtained by the standard 512-byte
-
-
-
- Page 6 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- sectors. This is because of the sector header. The sector
- header has the same size, regardless of how many data bytes
- are in the sector. Thus, we save some space by using _f_e_w_e_r,
- but bigger sectors. For example, 1 sector of 4K only takes
- up header space once, whereas 8 sectors of 512 bytes have
- also 8 headers, for the same amount of useful data.
-
- This method allows to store up to 1992K on a 3 1/2 HD disk.
-
- Mtools supports these formats only on Linux.
-
- 2222mmmm
- The 2m format was originally invented by Ciriaco Garcia de
- Celis. It also uses bigger sectors than usual in order to
- fit more data on the disk. However, it uses the standard
- format (18 sectors of 512 bytes each) on the first cylinder,
- in order to make these disks easyer to handle by DOS. Indeed
- this method allows to have a standard sized bootsector,
- which contains a description of how the rest of the disk
- should be read.
-
- However, the drawback of this is that the first cylinder can
- hold less data than the others. Unfortunately, DOS can only
- handle disks where each track contains the same amount of
- data. Thus 2m hides the fact that the first track contains
- less data by using a _s_h_a_d_o_w _F_A_T. (Usually, DOS stores the
- FAT in two identical copies, for additional safety. XDF
- stores only one copy, and it tells DOS that it stores two.
- Thus the same that would be taken up by the second FAT copy
- is saved.) This also means that your should nnnneeeevvvveeeerrrr uuuusssseeee aaaa 2222mmmm
- ddddiiiisssskkkk ttttoooo ssssttttoooorrrreeee aaaannnnyyyytttthhhhiiiinnnngggg eeeellllsssseeee tttthhhhaaaannnn aaaa DDDDOOOOSSSS ffffssss.
-
- Mtools supports these format only on Linux.
-
- XXXXDDDDFFFF
- XDF is a high capacity format used by OS/2. It can hold 1840
- K per disk. That's lower than the best 2m formats, but its
- main advantage is that it is fast: 600 milliseconds per
- track. That's faster than the 21 sector format, and almost
- as fast as the standard 18 sector format. In order to access
- these disks, make sure mtools has been compiled with XDF
- support, and set the use_xdf variable for the drive in the
- configuration file. See section Compiling mtools and `misc
- variables', for details on how to do this. Fast XDF access
- is only available for Linux kernels which are more recent
- than 1.1.34.
-
- Mtools supports this format only on Linux.
-
- CCCCaaaauuuuttttiiiioooonnnn //// AAAAtttttttteeeennnnttttiiiioooonnnn ddddiiiissssttttrrrriiiibbbbuuuuttttoooorrrrssss: If mtools is compiled on a
- Linux kernel more recent than 1.3.34, it won't run on an
- older kernel. However, if it has been compiled on an older
-
-
-
- Page 7 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- kernel, it still runs on a newer kernel, except that XDF
- access is slower. It is recommended that distribution
- authors only include mtools binaries compiled on kernels
- older than 1.3.34 until 2.0 comes out. When 2.0 will be out,
- mtools binaries compiled on newer kernels may (and should)
- be distributed. Mtools binaries compiled on kernels older
- than 1.3.34 won't run on any 2.1 kernel or later.
-
- EEEExxxxiiiitttt ccccooooddddeeeessss
- All the Mtools commands return 0 on success, 1 on utter
- failure, or 2 on partial failure. All the Mtools commands
- perform a few sanity checks before going ahead, to make sure
- that the disk is indeed an MS-DOS disk (as opposed to, say
- an ext2 or minix disk). These checks may reject partially
- corrupted disks, which might otherwise still be readable. To
- avoid these checks, set the MTOOLS_SKIP_CHECK environmental
- variable or the corresponding configuration file variable
- (see section global variables)
-
- BBBBuuuuggggssss
- An unfortunate side effect of not guessing the proper device
- (when multiple disk capacities are supported) is an
- occasional error message from the device driver. These can
- be safely ignored.
-
- The fat checking code chokes on 1.72 Mb disks mformatted
- with pre-2.0.7 mtools. Set the environmental variable
- MTOOLS_FAT_COMPATIBILITY (or the corresponding configuration
- file variable, `global variables') to bypass the fat
- checking.
-
- HHHHoooowwww ttttoooo ccccoooonnnnffffiiiigggguuuurrrreeee mmmmttttoooooooollllssss ffffoooorrrr yyyyoooouuuurrrr eeeennnnvvvviiiirrrroooonnnnmmmmeeeennnntttt
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- This sections explains the syntax of the configurations
- files for mtools. The configuration files are called
- `/usr/freeware/etc/mtools.conf' and `~/.mtoolsrc'. If the
- environmental variable MTOOLSRC is set, its contents is used
- as the filename for a third configuration file. These
- configuration files describe the following items:
-
- * Global configuration flags and variables
-
- * Per drive flags and variables
-
- * Character translation tables
-
- LLLLooooccccaaaattttiiiioooonnnn ooooffff tttthhhheeee ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeeessss
- `/usr/freeware/etc/mtools.conf' is the system-wide
- configuration file, and `~/.mtoolsrc' is the user's private
- configuration file.
-
- On some systems, the system-wide configuration file is
-
-
-
- Page 8 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- called `/etc/defaults/mtools.conf' instead.
-
- GGGGeeeennnneeeerrrraaaallll ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeee ssssyyyynnnnttttaaaaxxxx
- The configuration files is made up of sections. Each section
- starts with a keyword identifying the section followed by a
- colon. Then follow variable assignments and flags. Variable
- assignments take the following form: name=value
-
- Flags are lone keywords without an equal sign and value
- following them. A section either ends at the end of the
- file or where the next section begins.
-
- Lines starting with a hash (#) are comments. Newline
- characters are equivalent to whitespace (except where ending
- a comment). The configuration file is case insensitive,
- except for item enclosed in quotes (such as filenames).
-
- DDDDeeeeffffaaaauuuulllltttt vvvvaaaalllluuuueeeessss
- For most platforms, mtools contains reasonable compiled-in
- defaults for physical floppy drives. Thus, you usually
- don't need to bother with the configuration file, if all you
- want to do with mtools is to access your floppy drives. On
- the other hand, the configuration file is needed if you also
- want to use mtools to access your hard disk partitions and
- dosemu image files.
-
- GGGGlllloooobbbbaaaallll vvvvaaaarrrriiiiaaaabbbblllleeeessss
- Global flags may be set to 1 or to 0.
-
- The following global flags are recognized:
-
- MTOOLS_SKIP_CHECK
- If this is set to 1, mtools skips most of its sanity
- checks. This is needed to read some Atari disks which
- have been made with the earlier ROMs, and which would
- not be recognized otherwise.
-
- MTOOLS_FAT_COMPATIBILITY
- If this is set to 1, mtools skips the fat size checks.
- Some disks have a bigger FAT than they really need to.
- These are rejected if this option is not set.
-
- MTOOLS_LOWER_CASE
- If this is set to 1, mtools displays all-upper-case
- short filenames as lowercase. This has been done to
- allow a behavior which is consistent with older
- versions of mtools which didn't know about the case
- bits.
-
- MTOOLS_NO_VFAT
- If this is set to 1, mtools won't generate VFAT entries
- for filenames which are mixed-case, but otherwise legal
-
-
-
- Page 9 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- dos filenames. This is useful when working with DOS
- versions which can't grok VFAT longnames, such as
- FreeDos.
-
- MTOOLS_DOTTED_DIR
- In a wide directory, prints the short name with a dot
- instead of spaces separating the basename and the
- extension.
-
- MTOOLS_NAME_NUMERIC_TAIL
- If this is set to one (default), generate numeric tails
- for all long names (~1). If set to zero, only generate
- numeric tails if otherwise a clash would have happened.
-
- MTOOLS_TWENTY_FOUR_HOUR_CLOCK
- If 1, uses the European notation for times (twenty four
- hour clock), else uses the UK/US notation (am/pm)
-
- Example: Inserting the following line into your
- configuration file instructs mtools to skip the sanity
- checks:
-
- MMMMTTTTOOOOOOOOLLLLSSSS____SSSSKKKKIIIIPPPP____CCCCHHHHEEEECCCCKKKK====1111
-
-
-
- Global variables may also be set via the environment:
-
- eeeexxxxppppoooorrrrtttt MMMMTTTTOOOOOOOOLLLLSSSS____SSSSKKKKIIIIPPPP____CCCCHHHHEEEECCCCKKKK====1111
-
-
-
- Global string variables may be set to any value:
-
- MTOOLS_DATE_STRING
- The format used for printing dates of files. By
- default, is dd-mm-yyyy.
-
- PPPPeeeerrrr ddddrrrriiiivvvveeee ffffllllaaaaggggssss aaaannnndddd vvvvaaaarrrriiiiaaaabbbblllleeeessss
- GGGGeeeennnneeeerrrraaaallll iiiinnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
- Per drive flags and values may be described in a drive
- section. A drive section starts with drive "_d_r_i_v_e_l_e_t_t_e_r" :
-
- Then follow variable-value pairs and flags.
-
- This is a sample drive description:
-
- ddddrrrriiiivvvveeee aaaa::::
- ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000"""" uuuusssseeee____xxxxddddffff====1111
-
-
-
-
-
-
- Page 10 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- DDDDiiiisssskkkk GGGGeeeeoooommmmeeeettttrrrryyyy CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn
- Geometry information describes the physical characteristics
- about the disk. Its has three purposes:
-
- formatting
- The geometry information is written into the boot
- sector of the newly made disk. However, you may also
- describe the geometry information on the command line.
- See section mformat for details.
-
- filtering
- On some Unices there are device nodes which only
- support one physical geometry. For instance, you might
- need a different node to access a disk as high density
- or as low density. The geometry is compared to the
- actual geometry stored on the boot sector to make sure
- that this device node is able to correctly read the
- disk. If the geometry doesn't match, this drive entry
- fails, and the next drive entry bearing the same drive
- letter is tried. See section multiple descriptions for
- more details on supplying several descriptions for one
- drive letter.
-
- If no geometry information is supplied in the
- configuration file, all disks are accepted. On Linux
- (and on Sparc) there exist device nodes with
- configurable geometry (`/dev/fd0', `/dev/fd1' etc), and
- thus filtering is not needed (and ignored) for disk
- drives. (Mtools still does do filtering on plain files
- (disk images) in Linux: this is mainly intended for
- test purposes, as I don't have access to a Unix which
- would actually need filtering).
-
- If you do not need filtering, but want still a default
- geometry for mformatting, you may switch off filtering
- using the mformat_only flag.
-
- initial geometry
- On devices that support it (usually floppy devices),
- the geometry information is also used to set the
- initial geometry. This initial geometry is applied
- while reading the boot sector, which contains the real
- geometry. If no geometry information is supplied in
- the configuration file, or if the mformat_only flag is
- supplied, no initial configuration is done.
-
- On Linux, initial geometry is not really needed, as the
- configurable devices are able to auto-detect the disk
- type accurately enough (for most common formats) to
- read the boot sector.
-
- Wrong geometry information may lead to very bizarre errors.
-
-
-
- Page 11 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- That's why I strongly recommend that you add the
- mformat_only flag to your drive description, unless you
- really need filtering or initial geometry.
-
- The following geometry related variables are available:
-
- cylinders
- tracks
- The number of cylinders. (cylinders is the preferred
- form, tracks is considered obsolete)
-
- heads
- The number of heads (sides).
-
- sectors
- The number of sectors per track.
-
- Example: the following drive section describes a 1.44M
- drive:
-
- ddddrrrriiiivvvveeee aaaa::::
- ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH1111444444440000""""
- ffffaaaatttt____bbbbiiiittttssss====11112222
- ccccyyyylllliiiinnnnddddeeeerrrrssss====88880000 hhhheeeeaaaaddddssss====2222 sssseeeeccccttttoooorrrrssss====11118888
-
-
-
- The following shorthand geometry descriptions are available:
-
- 1.44m
- high density 3 1/2 disk. Equivalent to: fat_bits=12
- cylinders=80 heads=2 sectors=18
-
- 1.2m
- high density 5 1/4 disk. Equivalent to: fat_bits=12
- cylinders=80 heads=2 sectors=15
-
- 720k
- double density 3 1/2 disk. Equivalent to: fat_bits=12
- cylinders=80 heads=2 sectors=9
-
- 360k
- double density 5 1/4 disk. Equivalent to: fat_bits=12
- cylinders=40 heads=2 sectors=9
-
- The shorthand format descriptions may be amended. For
- example, 360k sectors=8 describes a 320k disk and is
- equivalent to: fat_bits=12 cylinders=40 heads=2 sectors=8
-
- OOOOppppeeeennnn FFFFllllaaaaggggssss
- Moreover, the following flags are available:
-
-
-
-
- Page 12 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- sync
- All i/o operations are done synchronously
-
- nodelay
- The device or file is opened with the O_NDELAY flag.
- This is needed on some non-Linux architectures.
-
- exclusive
- The device or file is opened with the O_EXCL flag. On
- Linux, this ensures exclusive access to the floppy
- drive. On most other architectures, and for plain files
- it has no effect at all.
-
- GGGGeeeennnneeeerrrraaaallll PPPPuuuurrrrppppoooosssseeee DDDDrrrriiiivvvveeee VVVVaaaarrrriiiiaaaabbbblllleeeessss
- The following general purpose drive variables are available.
- Depending to their type, these variables can be set to a
- string (file, precmd) or an integer (all others)
-
- file
- The name of the file or device holding the disk image.
- This is mandatory. The file name should be enclosed in
- quotes.
-
- partition
- Tells mtools to treat the drive as a partitioned
- device, and to use the given partition. Only primary
- partitions are accessible using this method, and they
- are numbered from 1 to 4. For logical partitions, use
- the more general offset variable. The partition
- variable is intended for removable media such as
- Syquests, ZIP drives, and magneto-optical disks.
- Although traditional DOS sees Syquests and magneto-
- optical disks as `giant floppy disks' which are
- unpartitioned, OS/2 and Windows NT treat them like hard
- disks, i.e. partioned devices. The partition flag is
- also useful DOSEMU hdimages. It is not recommended for
- hard disks for which direct access to partitions is
- available through mounting.
-
- offset
- Describes where in the file the MS-DOS filesystem
- starts. This is useful for logical partitions in DOSEMU
- hdimages, and for ATARI ram disks. By default, this is
- zero, meaning that the filesystem starts right at the
- beginning of the device or file.
-
- fat_bits
- The number of FAT bits. This may be 12 or 16. This is
- very rarely needed, as it can almost always be deduced
- from information in the boot sector. On the contrary,
- describing the number of fat bits may actually be
- harmful if you get it wrong. You should only use it if
-
-
-
- Page 13 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- mtools gets the autodetected number of fat bits wrong,
- or if you want to mformat a disk with a weird number of
- fat bits.
-
- precmd
-
- On some variants of Solaris, it is necessary to call
- 'volcheck -v' before opening a floppy device, in order
- for the system to notice that there is indeed a disk in
- the drive. precmd="volcheck -v" in the drive clause
- establishes the desired behavior.
-
- blocksize
-
- This parameter represents a default block size to be
- always used on this device. All I/O is done with
- multiples of this block size, independantly of the
- sector size registered in the filesystem's boot sector.
- This is useful for character devices whose sector size
- is not 512, such as for example CD Rom drives on
- Solaris.
-
- Only the file variable is mandatory. The other parameters
- may be left out. In that case a default value or an
- autodetected value is used.
-
- GGGGeeeennnneeeerrrraaaallll PPPPuuuurrrrppppoooosssseeee DDDDrrrriiiivvvveeee FFFFllllaaaaggggssss
- A flag can either be set to 1 (enabled) or 0 (disabled). If
- the value is ommitted, it is enabled. For example, scsi is
- equivalent to scsi=1
-
- nolock
- Instruct mtools to not use locking on this drive. This
- is needed on systems with buggy locking semantics.
- However, enabling this makes operation less safe in
- cases where several users may access the same drive at
- the same time.
-
- scsi
- When set to 1, this option tells mtools to use raw SCSI
- I/O instead of the standard read/write calls to access
- the device. Currently, this is supported on HP/UX,
- Solaris and SunOs. This is needed because on some
- architectures, such as SunOs or Solaris, PC media can't
- be accessed using the read and write syscalls, because
- the OS expects them to contain a Sun specific "disk
- label".
-
- As raw Scsi access always uses the whole device, you
- need to specify the "partition" flag in addition
-
- On some architectures, such as Solaris, mtools needs
-
-
-
- Page 14 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- root privileges to be able to use the scsi option.
- Thus mtools should be installed set uid root on Solaris
- if you want to access Zip/Jaz drives. Thus, if the
- scsi flag is given, privileged is automatically
- implied, unless explicitly disabled by privileged=0
-
- Mtools uses its root privileges to open the device, and
- to issue the actual SCSI I/O calls. Moreover, root
- privileges are only used for drives described in a
- system-wide configuration file such as
- `/usr/freeware/etc/mtools.conf', and not for those
- described in `~/.mtoolsrc' or `$MTOOLSRC'.
-
- privileged
- When set to 1, this instructs mtools to use its set-uid
- and set-gid privileges for opening the given drive.
- This option is only valid for drives described in the
- system-wide configuration files (such as
- `/usr/freeware/etc/mtools.conf', not `~/.mtoolsrc' or
- `$MTOOLSRC'). Obviously, this option is also a no op
- if mtools is not installed setuid or setgid. This
- option is implied by 'scsi=1', but again only for
- drives defined in system-wide configuration files.
- Privileged may also be set explicitely to 0, in order
- to tell mtools not to use its privileges for a given
- drive even if scsi=1 is set.
-
- Mtools only needs to be installed setuid if you use the
- privileged or scsi drive variables. If you do not use
- these options, mtools works perfectly well even when
- not installed setuid root.
-
- vold
-
- Instructs mtools to interpret the device name as a vold
- identifier rather than as a filename. The vold
- identifier is translated into a real filename using the
- media_findname() and media_oldaliases() functions of
- the volmgt library. This flag is only available if you
- configured mtools with the --enable-new-vold option
- before compilation.
-
- use_xdf
- If this is set to a non-zero value, mtools also tries
- to access this disk as an XDF disk. XDF is a high
- capacity format used by OS/2. This is off by default.
- See section XDF for more details.
-
- mformat_only
- Tells mtools to use the geometry for this drive only
- for mformatting and not for filtering.
-
-
-
-
- Page 15 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- remote
- Tells mtools to connect to floppyd (See section
- floppyd).
-
- SSSSuuuuppppppppllllyyyyiiiinnnngggg mmmmuuuullllttttiiiipppplllleeee ddddeeeessssccccrrrriiiippppttttiiiioooonnnnssss ffffoooorrrr aaaa ddddrrrriiiivvvveeee
- It is possible to supply multiple descriptions for a drive.
- In that case, the descriptions are tried in order until one
- is found that fits. Descriptions may fail for several
- reasons:
-
- 1. because the geometry is not appropriate,
-
- 2. because there is no disk in the drive,
-
- 3. or because of other problems.
-
- Multiple definitions are useful when using physical devices
- which are only able to support one single disk geometry.
- Example:
-
- ddddrrrriiiivvvveeee aaaa:::: ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH1111444444440000"""" 1111....44444444mmmm
- ddddrrrriiiivvvveeee aaaa:::: ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH777722220000"""" 777722220000kkkk
-
-
-
- This instructs mtools to use /dev/fd0H1440 for 1.44m (high
- density) disks and /dev/fd0H720 for 720k (double density)
- disks. On Linux, this feature is not really needed, as the
- /dev/fd0 device is able to handle any geometry.
-
- You may also use multiple drive descriptions to access both
- of your physical drives through one drive letter:
-
- ddddrrrriiiivvvveeee zzzz:::: ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000""""
- ddddrrrriiiivvvveeee zzzz:::: ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd1111""""
-
-
-
- With this description, mdir z: accesses your first physical
- drive if it contains a disk. If the first drive doesn't
- contain a disk, mtools checks the second drive.
-
- When using multiple configuration files, drive descriptions
- in the files parsed last override descriptions for the same
- drive in earlier files. In order to avoid this, use the
- drive+ or +drive keywords instead of drive. The first adds a
- description to the end of the list (i.e. it will be tried
- last), and the first adds it to the start of the list.
-
- CCCChhhhaaaarrrraaaacccctttteeeerrrr sssseeeetttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn ttttaaaabbbblllleeeessss
- If you live in the USA, in Western Europe or in Australia,
- you may skip this section.
-
-
-
- Page 16 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- WWWWhhhhyyyy cccchhhhaaaarrrraaaacccctttteeeerrrr sssseeeetttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn ttttaaaabbbblllleeeessss aaaarrrreeee nnnneeeeeeeeddddeeeedddd
- DOS uses a different character code mapping than Unix. 7-bit
- characters still have the same meaning, only characters with
- the eight bit set are affected. To make matters worse, there
- are several translation tables available depending on the
- country where you are. The appearance of the characters is
- defined using code pages. These code pages aren't the same
- for all countries. For instance, some code pages don't
- contain upper case accented characters. On the other hand,
- some code pages contain characters which don't exist in
- Unix, such as certain line-drawing characters or accented
- consonants used by some Eastern European countries. This
- affects two things, relating to filenames:
-
- upper case characters
- In short names, only upper case characters are allowed.
- This also holds for accented characters. For instance,
- in a code page which doesn't contain accented uppercase
- characters, the accented lowercase characters get
- transformed into their unaccented counterparts.
-
- long file names
- Micro$oft has finally come to their senses and uses a
- more standard mapping for the long file names. They use
- Unicode, which is basically a 32 bit version of ASCII.
- Its first 256 characters are identical to Unix ASCII.
- Thus, the code page also affects the correspondence
- between the codes used in long names and those used in
- short names
-
- Mtools considers the filenames entered on the command line
- as having the Unix mapping, and translates the characters to
- get short names. By default, code page 850 is used with the
- Swiss uppercase/lowercase mapping. I chose this code page,
- because its set of existing characters most closely matches
- Unix's. Moreover, this code page covers most characters in
- use in the USA, Australia and Western Europe. However, it is
- still possible to chose a different mapping. There are two
- methods: the country variable and explicit tables.
-
- CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn uuuussssiiiinnnngggg CCCCoooouuuunnnnttttrrrryyyy
- The COUNTRY variable is recommended for people which also
- have access to MS-DOS system files and documentation. If you
- don't have access to these, I'd suggest you'd rather use
- explicit tables instead.
-
- Syntax:
-
- COUNTRY="_c_o_u_n_t_r_y[,[_c_o_d_e_p_a_g_e], _c_o_u_n_t_r_y-_f_i_l_e]"
-
- This tells mtools to use a Unix-to-DOS translation table
- which matches _c_o_d_e_p_a_g_e and an lowercase-to-uppercase table
-
-
-
- Page 17 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- for _c_o_u_n_t_r_y and to use the _c_o_u_n_t_r_y-_f_i_l_e file to get the
- lowercase-to-uppercase table. The country code is most often
- the telephone prefix of the country. Refer to the DOS help
- page on "country" for more details. The _c_o_d_e_p_a_g_e and the
- _c_o_u_n_t_r_y-_f_i_l_e parameters are optional. Please don't type in
- the square brackets, they are only there to say which
- parameters are optional. The _c_o_u_n_t_r_y-_f_i_l_e file is supplied
- with MS-DOS, and is usually called `COUNTRY.SYS', and stored
- in the `C:\DOS' directory. In most cases you don't need it,
- as the most common translation tables are compiled into
- mtools. So, don't worry if you run a Unix-only box which
- lacks this file.
-
- If _c_o_d_e_p_a_g_e is not given, a per country default code page is
- used. If the _c_o_u_n_t_r_y-_f_i_l_e parameter isn't given, compiled-in
- defaults are used for the lowercase-to-uppercase table. This
- is useful for other Unices than Linux, which may have no
- `COUNTRY.SYS' file available online.
-
- The Unix-to-DOS are not contained in the `COUNTRY.SYS' file,
- and thus mtools always uses compiled-in defaults for those.
- Thus, only a limited amount of code pages are supported. If
- your preferred code page is missing, or if you know the name
- of the Windows 95 file which contains this mapping, could
- you please drop me a line at alain@linux.lu.
-
- The COUNTRY variable can also be set using the environment.
-
- CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn uuuussssiiiinnnngggg eeeexxxxpppplllliiiicccciiiitttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn ttttaaaabbbblllleeeessss
- Translation tables may be described in line in the
- configuration file. Two tables are needed: first the DOS-
- to-Unix table, and then the Lowercase-to-Uppercase table. A
- DOS-to-Unix table starts with the tounix keyword, followed
- by a colon, and 128 hexadecimal numbers. A lower-to-upper
- table starts with the fucase keyword, followed by a colon,
- and 128 hexadecimal numbers.
-
- The tables only show the translations for characters whose
- codes is greater than 128, because translation for lower
- codes is trivial.
-
- Example:
-
- ttttoooouuuunnnniiiixxxx::::
- 0000xxxxcccc7777 0000xxxxffffcccc 0000xxxxeeee9999 0000xxxxeeee2222 0000xxxxeeee4444 0000xxxxeeee0000 0000xxxxeeee5555 0000xxxxeeee7777
- 0000xxxxeeeeaaaa 0000xxxxeeeebbbb 0000xxxxeeee8888 0000xxxxeeeeffff 0000xxxxeeeeeeee 0000xxxxeeeecccc 0000xxxxcccc4444 0000xxxxcccc5555
- 0000xxxxcccc9999 0000xxxxeeee6666 0000xxxxcccc6666 0000xxxxffff4444 0000xxxxffff6666 0000xxxxffff2222 0000xxxxffffbbbb 0000xxxxffff9999
- 0000xxxxffffffff 0000xxxxdddd6666 0000xxxxddddcccc 0000xxxxffff8888 0000xxxxaaaa3333 0000xxxxdddd8888 0000xxxxdddd7777 0000xxxx5555ffff
- 0000xxxxeeee1111 0000xxxxeeeedddd 0000xxxxffff3333 0000xxxxffffaaaa 0000xxxxffff1111 0000xxxxdddd1111 0000xxxxaaaaaaaa 0000xxxxbbbbaaaa
- 0000xxxxbbbbffff 0000xxxxaaaaeeee 0000xxxxaaaacccc 0000xxxxbbbbdddd 0000xxxxbbbbcccc 0000xxxxaaaa1111 0000xxxxaaaabbbb 0000xxxxbbbbbbbb
- 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxcccc1111 0000xxxxcccc2222 0000xxxxcccc0000
- 0000xxxxaaaa9999 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxaaaa2222 0000xxxxaaaa5555 0000xxxxaaaacccc
-
-
-
- Page 18 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxeeee3333 0000xxxxcccc3333
- 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxaaaa4444
- 0000xxxxffff0000 0000xxxxdddd0000 0000xxxxcccc9999 0000xxxxccccbbbb 0000xxxxcccc8888 0000xxxx66669999 0000xxxxccccdddd 0000xxxxcccceeee
- 0000xxxxccccffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx7777cccc 0000xxxx44449999 0000xxxx5555ffff
- 0000xxxxdddd3333 0000xxxxddddffff 0000xxxxdddd4444 0000xxxxdddd2222 0000xxxxffff5555 0000xxxxdddd5555 0000xxxxbbbb5555 0000xxxxffffeeee
- 0000xxxxddddeeee 0000xxxxddddaaaa 0000xxxxdddd9999 0000xxxxffffdddd 0000xxxxdddddddd 0000xxxxddddeeee 0000xxxxaaaaffff 0000xxxxbbbb4444
- 0000xxxxaaaadddd 0000xxxxbbbb1111 0000xxxx5555ffff 0000xxxxbbbbeeee 0000xxxxbbbb6666 0000xxxxaaaa7777 0000xxxxffff7777 0000xxxxbbbb8888
- 0000xxxxbbbb0000 0000xxxxaaaa8888 0000xxxxbbbb7777 0000xxxxbbbb9999 0000xxxxbbbb3333 0000xxxxbbbb2222 0000xxxx5555ffff 0000xxxx5555ffff
-
- ffffuuuuccccaaaasssseeee::::
- 0000xxxx88880000 0000xxxx9999aaaa 0000xxxx99990000 0000xxxxbbbb6666 0000xxxx8888eeee 0000xxxxbbbb7777 0000xxxx8888ffff 0000xxxx88880000
- 0000xxxxdddd2222 0000xxxxdddd3333 0000xxxxdddd4444 0000xxxxdddd8888 0000xxxxdddd7777 0000xxxxddddeeee 0000xxxx8888eeee 0000xxxx8888ffff
- 0000xxxx99990000 0000xxxx99992222 0000xxxx99992222 0000xxxxeeee2222 0000xxxx99999999 0000xxxxeeee3333 0000xxxxeeeeaaaa 0000xxxxeeeebbbb
- 0000xxxx55559999 0000xxxx99999999 0000xxxx9999aaaa 0000xxxx9999dddd 0000xxxx9999cccc 0000xxxx9999dddd 0000xxxx9999eeee 0000xxxx9999ffff
- 0000xxxxbbbb5555 0000xxxxdddd6666 0000xxxxeeee0000 0000xxxxeeee9999 0000xxxxaaaa5555 0000xxxxaaaa5555 0000xxxxaaaa6666 0000xxxxaaaa7777
- 0000xxxxaaaa8888 0000xxxxaaaa9999 0000xxxxaaaaaaaa 0000xxxxaaaabbbb 0000xxxxaaaacccc 0000xxxxaaaadddd 0000xxxxaaaaeeee 0000xxxxaaaaffff
- 0000xxxxbbbb0000 0000xxxxbbbb1111 0000xxxxbbbb2222 0000xxxxbbbb3333 0000xxxxbbbb4444 0000xxxxbbbb5555 0000xxxxbbbb6666 0000xxxxbbbb7777
- 0000xxxxbbbb8888 0000xxxxbbbb9999 0000xxxxbbbbaaaa 0000xxxxbbbbbbbb 0000xxxxbbbbcccc 0000xxxxbbbbdddd 0000xxxxbbbbeeee 0000xxxxbbbbffff
- 0000xxxxcccc0000 0000xxxxcccc1111 0000xxxxcccc2222 0000xxxxcccc3333 0000xxxxcccc4444 0000xxxxcccc5555 0000xxxxcccc7777 0000xxxxcccc7777
- 0000xxxxcccc8888 0000xxxxcccc9999 0000xxxxccccaaaa 0000xxxxccccbbbb 0000xxxxcccccccc 0000xxxxccccdddd 0000xxxxcccceeee 0000xxxxccccffff
- 0000xxxxdddd1111 0000xxxxdddd1111 0000xxxxdddd2222 0000xxxxdddd3333 0000xxxxdddd4444 0000xxxx44449999 0000xxxxdddd6666 0000xxxxdddd7777
- 0000xxxxdddd8888 0000xxxxdddd9999 0000xxxxddddaaaa 0000xxxxddddbbbb 0000xxxxddddcccc 0000xxxxdddddddd 0000xxxxddddeeee 0000xxxxddddffff
- 0000xxxxeeee0000 0000xxxxeeee1111 0000xxxxeeee2222 0000xxxxeeee3333 0000xxxxeeee5555 0000xxxxeeee5555 0000xxxxeeee6666 0000xxxxeeee8888
- 0000xxxxeeee8888 0000xxxxeeee9999 0000xxxxeeeeaaaa 0000xxxxeeeebbbb 0000xxxxeeeedddd 0000xxxxeeeedddd 0000xxxxeeeeeeee 0000xxxxeeeeffff
- 0000xxxxffff0000 0000xxxxffff1111 0000xxxxffff2222 0000xxxxffff3333 0000xxxxffff4444 0000xxxxffff5555 0000xxxxffff6666 0000xxxxffff7777
- 0000xxxxffff8888 0000xxxxffff9999 0000xxxxffffaaaa 0000xxxxffffbbbb 0000xxxxffffcccc 0000xxxxffffdddd 0000xxxxffffeeee 0000xxxxffffffff
-
-
-
- The first table maps DOS character codes to Unix character
- codes. For example, the DOS character number 129. This is a
- u with to dots on top of it. To translate it into Unix, we
- look at the character number 1 in the first table (1 = 129 -
- 128). This is 0xfc. (Beware, numbering starts at 0). The
- second table maps lower case DOS characters to upper case
- DOS characters. The same lower case u with dots maps to
- character 0x9a, which is an uppercase U with dots in DOS.
-
- UUUUnnnniiiiccccooooddddeeee cccchhhhaaaarrrraaaacccctttteeeerrrrssss ggggrrrreeeeaaaatttteeeerrrr tttthhhhaaaannnn 222255556666
- If an existing MS-DOS name contains Unicode character
- greater than 256, these are translated to underscores or to
- characters which are close in visual appearance. For
- example, accented consonants are translated into their
- unaccented counterparts. This translation is used for mdir
- and for the Unix filenames generated by mcopy. Linux does
- support Unicode too, but unfortunately too few applications
- support it yet to bother with it in mtools. Most
- importantly, xterm can't display Unicode yet. If there is
- sufficient demand, I might include support for Unicode in
- the Unix filenames as well.
-
- CCCCaaaauuuuttttiiiioooonnnn:::: When deleting files with mtools, the underscore
-
-
-
- Page 19 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- matches all characters which can't be represented in Unix.
- Be careful with mdel!
-
- LLLLooooccccaaaattttiiiioooonnnn ooooffff ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeeessss aaaannnndddd ppppaaaarrrrssssiiiinnnngggg oooorrrrddddeeeerrrr
- The configuration files are parsed in the following order:
-
- 1. compiled-in defaults
-
- 2. `/usr/freeware/etc/mtools.conf'
-
- 3. `/etc/mtools' This is for backwards compatibility only,
- and is only parsed if `mtools.conf' doesn't exist.
-
- 4. `~/.mtoolsrc'.
-
- 5. `$MTOOLSRC' (file pointed by the MTOOLSRC environmental
- variable)
-
- Options described in the later files override those
- described in the earlier files. Drives defined in earlier
- files persist if they are not overridden in the later files.
- For instance, drives A and B may be defined in
- `/usr/freeware/etc/mtools.conf' and drives C and D may be
- defined in `~/.mtoolsrc' However, if `~/.mtoolsrc' also
- defines drive A, this new description would override the
- description of drive A in `/usr/freeware/etc/mtools.conf'
- instead of adding to it. If you want to add a new
- description to a drive already described in an earlier file,
- you need to use either the +drive or drive+ keyword.
-
- BBBBaaaacccckkkkwwwwaaaarrrrddddssss ccccoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy wwwwiiiitttthhhh oooolllldddd ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeee ssssyyyynnnnttttaaaaxxxx
- The syntax described herein is new for version mtools-3.0.
- The old line-oriented syntax is still supported. Each line
- beginning with a single letter is considered to be a drive
- description using the old syntax. Old style and new style
- drive sections may be mixed within the same configuration
- file, in order to make upgrading easier. Support for the old
- syntax will be phased out eventually, and in order to
- discourage its use, I purposefully omit its description
- here.
-
- CCCCoooommmmmmmmaaaannnndddd lllliiiisssstttt
- This section describes the available mtools commands, and
- the command line parameters that each of them accepts.
- Options which are common to all mtools commands are not
- described here, `arguments' for a description of those.
-
- FFFFllllooooppppppppyyyydddd
- Floppyd is used as a server to grant access to the floppy
- drive to clients running on a remote machine, just as an X
- server grants access to the display to remote clients. It
- has the following syntax:
-
-
-
- Page 20 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- floppyd [-d] [-l] [-s _p_o_r_t] [-r _u_s_e_r] [-b _i_p_a_d_d_r] _d_e_v_i_c_e_n_a_m_e
- [_d_i_s_p_l_a_y_n_a_m_e_s]
-
- floppyd is always associated with an X server. It runs on
- the same machine as its X server, and listens on port 5703
- and above.
-
- AAAAuuuutttthhhheeeennnnttttiiiiccccaaaattttiiiioooonnnn
- floppyd authenticates remote clients using the Xauthority
- protocol. Xhost authentication is not supported. Each
- floppyd is associated with an X server. When a remote
- client attempts to connect to floppyd, it sends floppyd the
- X authority record corresponding to floppyd's X server.
- Floppyd in turn then tries to open up a connection to the X
- server in order to verify the authenticity of the xauth
- record. If the connection to the X server succeeds, the
- client is granted access
-
- CCCCaaaauuuuttttiiiioooonnnn: In order to make authentication work correctly, the
- local host should nnnnooootttt be listed in the xhost list of allowed
- hosts.
- Indeed, hosts listed in xhost do not need a correct
- Xauthority cookie to connect to the X server. As floppyd
- runs on the same host as the X server, all its probe
- connection would succeed even for clients who supplied a bad
- cookie. This means that your floppy drive would be open to
- the world, i.e. a huge security hole.
- If your X server does not allow you to remove localhost:0
- and :0 from the xhost list, you can prevent floppyd from
- probing those display names with the -l option.
-
- CCCCoooommmmmmmmaaaannnndddd lllliiiinnnneeee ooooppppttttiiiioooonnnnssss
- d Daemon mode. Floppyd runs its own server loop. Do not
- supply this if you start floppyd from inetd.conf
-
- s _p_o_r_t
- Port number for deamon mode. Default is 5703 +
- _d_i_s_p_l_a_y_n_u_m_b_e_r. This flag implies daemon mode. For
- example, for display hitchhiker:5, the port would be
- 5708.
-
- b _i_p_a_d_d_r
- Bind address (for multihomed hosts). This flag implies
- daemon mode
-
- r _u_s_e_r
- Run the server under as the given user
-
- l Do not generate local default display names
-
- _d_e_v_i_c_e_n_a_m_e is the name of the device node to be opened.
- Default is /dev/fd0.
-
-
-
- Page 21 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- _d_i_s_p_l_a_y_n_a_m_e_s is a list of display names to connect to for
- authentication. All displays in the list are tried until
- one is found that grants access or until the list is
- exhausted. If no list is supplied, the a display name list
- based on the ip address supplied using the -b flag is
- constructed: _i_p_a_d_d_r:_n.0.
-
- * :_n.0
- If floppyd is started from inetd, the address of the
- socket used for stdin is used as a bind address.
-
- If no bind address is supplied, a list containing the
- following 3 items is constructed:
-
- * _h_o_s_t_n_a_m_e:_n.0
-
- * localhost:_n.0
-
- * :_n.0
-
- _n is the display number derived from the port number (_p_o_r_t
- - 5703 modulo 10). The local items (localhost:0 and :0) are
- not constructed if the -l flag is given.
-
- CCCCoooonnnnnnnneeeeccccttttiiiinnnngggg ttttoooo ffffllllooooppppppppyyyydddd
- In order to use floppyd, add the flag remote to the device
- description in your `~/.mtoolsrc' file. If the flag remote
- is given, the file parameter of the device description is
- taken to be a remote address. It's format is the following:
- _h_o_s_t_n_a_m_e:_d_i_s_p_l_a_y_n_u_m_b_e_r[/_b_a_s_e_p_o_r_t]. When using this entry,
- mtools connects to port _b_a_s_e_p_o_r_t+_d_i_s_p_l_a_y_n_u_m_b_e_r at _h_o_s_t_n_a_m_e.
- By default _b_a_s_e_p_o_r_t is 5703.
-
- EEEExxxxaaaammmmpppplllleeeessss::::
- The following starts a floppy daemon giving access to
- `/dev/fd0', listening on the default port 5703, tied to the
- default X servers:
-
- ffffllllooooppppppppyyyydddd ----dddd ////ddddeeeevvvv////ffffdddd0000
-
-
-
- Each of the following starts a floppy daemon giving access
- to `/dev/fd1', tied to the :1 local X servers, and listening
- on port 5704. We assume that the local host is named
- hitchhiker.
-
- ffffllllooooppppppppyyyydddd ----dddd ////ddddeeeevvvv////ffffdddd0000 llllooooccccaaaallllhhhhoooosssstttt::::1111 hhhhiiiittttcccchhhhhhhhiiiikkkkeeeerrrr::::1111 ::::1111
- ffffllllooooppppppppyyyydddd ----pppp 5555777700004444 ////ddddeeeevvvv////ffffdddd0000
-
-
-
-
-
-
- Page 22 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- If you want to start floppyd by inetd instead of running it
- as a daemon, insert the following lines into
- `/etc/services':
-
- #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn
- ffffllllooooppppppppyyyydddd----0000 5555777700003333////ttttccccpppp #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn ffffoooorrrr XXXX sssseeeerrrrvvvveeeerrrr ::::0000
- ffffllllooooppppppppyyyydddd----1111 5555777700004444////ttttccccpppp #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn ffffoooorrrr XXXX sssseeeerrrrvvvveeeerrrr ::::1111
-
-
-
- And insert the following into `/etc/inetd.conf' (assuming
- that you have defined a user named floppy in your
- `/etc/passwd'):
-
- #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn
- ffffllllooooppppppppyyyydddd----0000 ssssttttrrrreeeeaaaammmm ttttccccpppp wwwwaaaaiiiitttt ffffllllooooppppppppyyyy ////uuuussssrrrr////ssssbbbbiiiinnnn////ffffllllooooppppppppyyyydddd ffffllllooooppppppppyyyydddd ////ddddeeeevvvv////ffffdddd0000
- ffffllllooooppppppppyyyydddd----1111 ssssttttrrrreeeeaaaammmm ttttccccpppp wwwwaaaaiiiitttt ffffllllooooppppppppyyyy ////uuuussssrrrr////ssssbbbbiiiinnnn////ffffllllooooppppppppyyyydddd ffffllllooooppppppppyyyydddd ////ddddeeeevvvv////ffffdddd1111
-
-
-
- Note that you need to supply the X display names for the
- second floppyd. This is because the port is opened by
- inetd.conf, and hence floppyd cannot know its number to
- interfere the display number.
-
- On the client side, insert the following into your
- `~/.mtoolsrc' to define a drive letter accessing floppy
- drive in your X terminal:
-
- ddddrrrriiiivvvveeee xxxx:::: ffffiiiilllleeee====""""$$$$DDDDIIIISSSSPPPPLLLLAAAAYYYY"""" rrrreeeemmmmooootttteeee
-
-
-
- MMMMaaaattttttttrrrriiiibbbb
- Mattrib is used to change MS-DOS file attribute flags. It
- has the following syntax:
-
- mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] [-/] [-X] _m_s_d_o_s_f_i_l_e
- [ _m_s_d_o_s_f_i_l_e_s ... ]
-
- Mattrib adds attribute flags to an MS-DOS file (with the `+'
- operator) or remove attribute flags (with the `-' operator).
-
- Mattrib supports the following attribute bits:
-
- a Archive bit. Used by some backup programs to indicate
- a new file.
-
- r Read-only bit. Used to indicate a read-only file.
- Files with this bit set cannot be erased by DEL nor
- modified.
-
-
-
-
- Page 23 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- s System bit. Used by MS-DOS to indicate a operating
- system file.
-
- h Hidden bit. Used to make files hidden from DIR.
-
- Mattrib supports the following command line flags:
-
- / Recursive. Recursively list the attributes of the
- files in the subdirectories.
-
- X Concise. Prints the attributes whithout any whitespace
- padding. This is convenient for script. If neither
- the "/" option is given, nor the _m_s_d_o_s_f_i_l_e contains a
- wildcard, and there is only one Msdos file parameter on
- the command line, only the attribute is printed, and
- not the filename. This option is convenient for
- scripts
-
- MMMMbbbbaaaaddddbbbblllloooocccckkkkssss
- The mbadblocks command is used to scan an MS-DOS floppy and
- mark its unused bad blocks as bad. It uses the following
- syntax:
-
- mbadblocks _d_r_i_v_e:
-
- Mbadblocks scans an MS-DOS floppy for bad blocks. All unused
- bad blocks are marked as such in the FAT. This is intended
- to be used right after mformat. It is not intended to
- salvage bad disks.
-
- BBBBuuuuggggssss
- Mbadblocks should (but doesn't yet :-( ) also try to salvage
- bad blocks which are in use by reading them repeatedly, and
- then mark them bad.
-
- MMMMccccdddd
- The mcd command is used to change the mtools working
- directory on the MS-DOS disk. It uses the following syntax:
-
- mcd [_m_s_d_o_s_d_i_r_e_c_t_o_r_y]
-
-
-
- Without arguments, mcd reports the current device and
- working directory. Otherwise, mcd changes the current
- device and current working directory relative to an MS-DOS
- filesystem.
-
- The environmental variable MCWD may be used to locate the
- file where the device and current working directory
- information is stored. The default is `$HOME/.mcwd'.
- Information in this file is ignored if the file is more than
-
-
-
- Page 24 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- 6 hours old.
-
- Mcd returns 0 on success or 1 on failure.
-
- Unlike MS-DOS versions of CD, mcd can be used to change to
- another device. It may be wise to remove old `.mcwd' files
- at logout.
-
- MMMMccccooooppppyyyy
- The mcopy command is used to copy MS-DOS files to and from
- Unix. It uses the following syntax:
-
- mcopy [-b/ptnvmoQOsSrRA] _s_o_u_r_c_e_f_i_l_e _t_a_r_g_e_t_f_i_l_e
- mcopy [-b/ptnvmoQOsSrRA] _s_o_u_r_c_e_f_i_l_e [ _s_o_u_r_c_e_f_i_l_e_s... ] _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
- mcopy [-tnvm] _M_S_D_O_S_s_o_u_r_c_e_f_i_l_e
-
-
-
- Mcopy copies the specified file to the named file, or copies
- multiple files to the named directory. The source and
- target can be either MS-DOS or Unix files.
-
- The use of a drive letter designation on the MS-DOS files,
- 'a:' for example, determines the direction of the transfer.
- A missing drive designation implies a Unix file whose path
- starts in the current directory. If a source drive letter
- is specified with no attached file name (e.g. mcopy a: .),
- all files are copied from that drive.
-
- If only a single, MS-DOS source parameter is provided (e.g.
- "mcopy a:foo.exe"), an implied destination of the current
- directory (`.') is assumed.
-
- A filename of `-' means standard input or standard output,
- depending on its position on the command line.
-
- Mcopy accepts the following command line options:
-
- b Batch mode. Optimized for huge recursive copies, but
- less secure if a crash happens during the copy.
-
- / Recursive copy. Also copies directories and their
- contents
-
- p Preserves the attributes of the copied files
-
- Q When mcopying multiple files, quits as soon as one copy
- fails (for example due to lacking storage space on the
- target disk)
-
- t Text file transfer. Mcopy translates incoming carriage
- return/line feeds to line feeds.
-
-
-
- Page 25 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- n No confirmation when overwriting Unix files. Mcopy
- doesn't warn the user when overwriting an existing Unix
- file. In order to switch off confirmation for DOS
- files, use -o.
-
- m Preserve the file modification time. If the target file
- already exists, and the -n option is not in effect,
- mcopy asks whether to overwrite the file or to rename
- the new file (`name clashes') for details).
-
- BBBBuuuuggggssss
- Unlike MS-DOS, the '+' operator (append) from MS-DOS is not
- supported. However, you may use mtype to produce the same
- effect:
-
- mmmmttttyyyyppppeeee aaaa::::ffffiiiilllleeee1111 aaaa::::ffffiiiilllleeee2222 aaaa::::ffffiiiilllleeee3333 >>>>uuuunnnniiiixxxxffffiiiilllleeee
- mmmmttttyyyyppppeeee aaaa::::ffffiiiilllleeee1111 aaaa::::ffffiiiilllleeee2222 aaaa::::ffffiiiilllleeee3333 |||| mmmmccccooooppppyyyy ---- aaaa::::mmmmssssddddoooossssffffiiiilllleeee
-
-
-
- MMMMddddeeeellll
- The mdel command is used to delete an MS-DOS file. Its
- syntax is:
-
- mdel [-v] _m_s_d_o_s_f_i_l_e [ _m_s_d_o_s_f_i_l_e_s ... ]
-
-
- Mdel deletes files on an MS-DOS filesystem.
-
- Mdel asks for verification prior to removing a read-only
- file.
-
- MMMMddddeeeellllttttrrrreeeeeeee
- The mdeltree command is used to delete an MS-DOS file. Its
- syntax is:
-
- mdeltree [-v] _m_s_d_o_s_d_i_r_e_c_t_o_r_y [_m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s...]
-
-
- Mdeltree removes a directory and all the files and
- subdirectories it contains from an MS-DOS filesystem. An
- error occurs if the directory to be removed does not exist.
-
- MMMMddddiiiirrrr
- The mdir command is used to display an MS-DOS directory. Its
- syntax is:
-
- mdir [-/] [-f] [-w] [-a] [-X] _m_s_d_o_s_f_i_l_e [ _m_s_d_o_s_f_i_l_e_s...]
-
- Mdir displays the contents of MS-DOS directories, or the
- entries for some MS-DOS files.
-
-
-
-
- Page 26 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- Mdir supports the following command line options:
-
- / Recursive output, just like Dos' -s option
-
- w Wide output. With this option, mdir prints the
- filenames across the page without displaying the file
- size or creation date.
-
- a Also list hidden files.
-
- f Fast. Do not try to find out free space. On larger
- disks, finding out the amount of free space takes up
- some non trivial amount of time, as the whole FAT must
- be read in and scanned. The -f flag bypasses this
- step. This flag is not needed on FAT32 filesystems,
- which store the size explicitely.
-
- X Concise listing. List only a newline separated list of
- pathnames without any decoration nor additional
- information
-
- An error occurs if a component of the path is not a
- directory.
-
- MMMMdddduuuu
- Mdu is used to list the space occupied by a directory, its
- subdirectories and its files. It is similar to the du
- command on Unix. The unit used are clusters. Use the minfo
- command to find out the cluster size.
-
- mdu [-a] [ _m_s_d_o_s_f_i_l_e_s ... ]
-
- a All files. List also the space occupied for individual
- files.
-
- s Only list the total space, don't give details for each
- subdirectory.
-
- MMMMffffoooorrrrmmmmaaaatttt
- The mformat command is used to add an MS-DOS filesystem to a
- low-level formatted diskette. Its syntax is:
-
- mformat [-t _c_y_l_i_n_d_e_r_s] [-h _h_e_a_d_s] [-s _s_e_c_t_o_r_s] [-l
- _v_o_l_u_m_e__l_a_b_e_l] [-F] [-I _f_s_V_e_r_s_i_o_n] [-S _s_i_z_e_c_o_d_e] [-2
- _s_e_c_t_o_r_s__o_n__t_r_a_c_k__0] [-M _s_o_f_t_w_a_r_e__s_e_c_t_o_r__s_i_z_e] [-a] [-X] [-C]
- [-H _h_i_d_d_e_n__s_e_c_t_o_r_s] [-r _r_o_o_t__s_e_c_t_o_r_s] [-B _b_o_o_t__s_e_c_t_o_r] [-0
- _r_a_t_e__o_n__t_r_a_c_k__0] [-A _r_a_t_e__o_n__o_t_h_e_r__t_r_a_c_k_s] [-1] [-k] _d_r_i_v_e:
-
-
- Mformat adds a minimal MS-DOS filesystem (boot sector, FAT,
- and root directory) to a diskette that has already been
- formatted by a Unix low-level format.
-
-
-
- Page 27 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- The following options are supported: (The S, 2, 1 and M
- options may not exist if this copy of mtools has been
- compiled without the USE_2M option)
-
- t The number of cylinders.
-
- h The number of heads (sides).
-
- s The number of sectors per track. If the 2m option is
- given, number of 512-byte sector equivalents on generic
- tracks (i.e. not head 0 track 0). If the 2m option is
- not given, number of physical sectors per track (which
- may be bigger than 512 bytes).
-
- l An optional volume label.
-
- S The sizecode. The size of the sector is 2 ^ (sizecode +
- 7).
-
- 2 2m format. The parameter to this option describes the
- number of sectors on track 0, head 0. This option is
- recommended for sectors bigger than normal.
-
- 1 don't use a 2m format, even if the current geometry of
- the disk is a 2m geometry.
-
- M software sector size. This parameter describes the
- sector size in bytes used by the MS-DOS filesystem. By
- default it is the physical sector size.
-
- a If this option is given, an Atari style serial number
- is generated. Ataris store their serial number in the
- OEM label.
-
- X formats the disk as an XDF disk. See section XDF for
- more details. The disk has first to be low-level
- formatted using the xdfcopy utility included in the
- fdutils package.
-
- C creates the disk image file to install the MS-DOS
- filesystem on it. Obviously, this is useless on
- physical devices such as floppies and hard disk
- partitions.
-
- H number of hidden sectors. This parameter is useful for
- formatting hard disk partition, which are not aligned
- on track boundaries (i.e. first head of first track
- doesn't belong to the partition, but contains a
- partition table). In that case the number of hidden
- sectors is in general the number of sectors per
- cylinder. This is untested.
-
-
-
-
- Page 28 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- n serial number
-
- F Format the partition as FAT32 (experimental).
-
- I Sets the fsVersion id when formatting a FAT32 drive.
- In order to find this out, run minfo on an existing
- FAT32 drive, and mail me about it, so I can include the
- correct value in future versions of mtools.
-
- c Sets the size of a cluster (in sectors). If this
- cluster size would generate a FAT that too big for its
- number of bits, mtools automatically increases the
- cluster size, until the FAT is small enough.
-
- r Sets the size of the root directory (in sectors). Only
- applicable to 12 and 16 bit FATs.
-
- B Use the bootsector stored in the given file or device,
- instead of using its own. Only the geometry fields are
- updated to match the target disks parameters.
-
- k Keep the existing boot sector as much as possible.
- Only the geometry fields are updated to match the
- target disks parameters.
-
- 0 Data transfer rate on track 0
-
- A Data transfer rate on tracks other than 0
-
- To format a diskette at a density other than the default,
- you must supply (at least) those command line parameters
- that are different from the default.
-
- Mformat returns 0 on success or 1 on failure.
-
- It doesn't record bad block information to the Fat, use
- mkmanifest for that.
-
- MMMMkkkkmmmmaaaannnniiiiffffeeeesssstttt
- The mkmanifest command is used to create a shell script
- (packing list) to restore Unix filenames. Its syntax is:
-
- mkmanifest [ _f_i_l_e_s ]
-
- Mkmanifest creates a shell script that aids in the
- restoration of Unix filenames that got clobbered by the MS-
- DOS filename restrictions. MS-DOS filenames are restricted
- to 8 character names, 3 character extensions, upper case
- only, no device names, and no illegal characters.
-
- The mkmanifest program is compatible with the methods used
- in pcomm, arc, and mtools to change perfectly good Unix
-
-
-
- Page 29 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- filenames to fit the MS-DOS restrictions. This command is
- only useful if the target system which will read the
- diskette cannot handle vfat long names.
-
- EEEExxxxaaaammmmpppplllleeee
- You want to copy the following Unix files to a MS-DOS
- diskette (using the mcopy command).
-
- vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee
- 2222....mmmmaaaannnnyyyy....ddddoooottttssss
- iiiilllllllleeeeggggaaaallll::::
- ggggoooooooodddd....cccc
- pppprrrrnnnn....ddddeeeevvvv
- CCCCaaaappppiiiittttaaaallll
-
-
-
- Mcopy converts the names to:
-
- vvvveeeerrrryyyy____lllloooonnnn
- 2222xxxxmmmmaaaannnnyyyy....ddddooootttt
- iiiilllllllleeeeggggaaaallllxxxx
- ggggoooooooodddd....cccc
- xxxxpppprrrrnnnn....ddddeeeevvvv
- ccccaaaappppiiiittttaaaallll
-
-
-
- The command:
-
- mmmmkkkkmmmmaaaannnniiiiffffeeeesssstttt vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee 2222....mmmmaaaannnnyyyy....ddddoooottttssss iiiilllllllleeeeggggaaaallll:::: ggggoooooooodddd....cccc pppprrrrnnnn....ddddeeeevvvv CCCCaaaappppiiiittttaaaallll >>>>mmmmaaaannnniiiiffffeeeesssstttt
-
- would produce the following:
-
- mmmmvvvv vvvveeeerrrryyyy____lllloooonnnn vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee
- mmmmvvvv 2222xxxxmmmmaaaannnnyyyy....ddddooootttt 2222....mmmmaaaannnnyyyy....ddddoooottttssss
- mmmmvvvv iiiilllllllleeeeggggaaaallllxxxx iiiilllllllleeeeggggaaaallll::::
- mmmmvvvv xxxxpppprrrrnnnn....ddddeeeevvvv pppprrrrnnnn....ddddeeeevvvv
- mmmmvvvv ccccaaaappppiiiittttaaaallll CCCCaaaappppiiiittttaaaallll
-
-
-
- Notice that "good.c" did not require any conversion, so it
- did not appear in the output.
-
- Suppose I've copied these files from the diskette to another
- Unix system, and I now want the files back to their original
- names. If the file "manifest" (the output captured above)
- was sent along with those files, it could be used to convert
- the filenames.
-
- BBBBuuuuggggssss
-
-
-
- PPPPaaaaggggeeee 33330000 ((((pppprrrriiiinnnntttteeeedddd 7777////11115555////99998888))))
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- The short names generated by mkmanifest follow the old
- convention (from mtools-2.0.7) and not the one from Windows
- 95 and mtools-3.0.
-
- MMMMiiiinnnnffffoooo
- The minfo command prints the parameters of a Dos filesystem,
- such as number of sectors, heads and cylinders. It also
- prints an mformat command line which can be used to create a
- similar Dos filesystem on another media. However, this
- doesn't work with 2m or Xdf media, and with Dos 1.0
- filesystems minfo _d_r_i_v_e:
-
-
- Mlabel supports the following option:
-
- v Prints a hexdump of the bootsector, in addition to the
- other information
-
- MMMMllllaaaabbbbeeeellll
- The mlabel command adds a volume label to a disk. Its syntax
- is: mlabel [-vcs] _d_r_i_v_e:[_n_e_w__l_a_b_e_l]
-
-
- Mlabel displays the current volume label, if present. If
- _n_e_w__l_a_b_e_l is not given, and if neither the c nor the s
- options are set, it prompts the user for a new volume label.
- To delete an existing volume label, press return at the
- prompt.
-
- Reasonable care is taken to create a valid MS-DOS volume
- label. If an invalid label is specified, mlabel changes the
- label (and displays the new label if the verbose mode is
- set). Mlabel returns 0 on success or 1 on failure.
-
- Mlabel supports the following options:
-
- c Clears an existing label, without prompting the user
-
- s Shows the existing label, without prompting the user.
-
- MMMMmmmmdddd
- The mmd command is used to make an MS-DOS subdirectory. Its
- syntax is:
-
- mmd [-voOsSrRA] _m_s_d_o_s_d_i_r_e_c_t_o_r_y [ _m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s... ]
-
- Mmd makes a new directory on an MS-DOS filesystem. An error
- occurs if the directory already exists.
-
- MMMMmmmmoooouuuunnnntttt
- The mmount command is used to mount an MS-DOS disk. It is
- only available on Linux, as it is only useful if the OS
-
-
-
- Page 31 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- kernel allows to configure the disk geometry. Its syntax is:
-
- mmount _m_s_d_o_s_d_r_i_v_e [_m_o_u_n_t_a_r_g_s]
-
- Mmount reads the boot sector of an MS-DOS disk, configures
- the drive geometry, and finally mounts it passing mountargs
- to mount. If no mount arguments are specified, the name of
- the device is used. If the disk is write protected, it is
- automatically mounted read only.
-
- MMMMmmmmoooovvvveeee
- The mmove command is used to moves or renames an existing
- MS-DOS file or subdirectory. mmove [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e
- _t_a_r_g_e_t_f_i_l_e mmove [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e [ _s_o_u_r_c_e_f_i_l_e_s... ]
- _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
-
- Mmove moves or renames an existing MS-DOS file or
- subdirectory. Unlike the MS-DOS version of MOVE, mmove is
- able to move subdirectories. Files or directories can only
- be moved within one filesystem. Data cannot be moved from
- Dos to Unix or vice-versa. If you omit the drive letter
- from the target file or directory, the same letter as for
- the source is assumed. If you omit the drive letter from
- all parameters, drive a: is assumed by default.
-
- MMMMppppaaaarrrrttttiiiittttiiiioooonnnn
- The mpartition command is used to create MS-DOS filesystems
- as partitions. This is intended to be used on non-Linux
- systems, i.e. systems where fdisk and easy access to Scsi
- devices are not available. This command only works on
- drives whose partition variable is set.
-
- mpartition -p _d_r_i_v_e mpartition -r _d_r_i_v_e mpartition -I _d_r_i_v_e
- mpartition -a _d_r_i_v_e mpartition -d _d_r_i_v_e mpartition -c [-s
- _s_e_c_t_o_r_s] [-h _h_e_a_d_s] [-t _c_y_l_i_n_d_e_r_s] [-v [-T _t_y_p_e] [-b _b_e_g_i_n]
- [-l length] [-f]
-
-
- Mpartition supports the following operations:
-
- p Prints a command line to recreate the partition for the
- drive. Nothing is printed if the partition for the
- drive is not defined, or an inconsistency has been
- detected. If verbose (-v) is also set, prints the
- current partition table.
-
- r Removes the partition described by _d_r_i_v_e.
-
- I Initializes the partition table, and removes all
- partitions.
-
- c Creates the partition described by _d_r_i_v_e.
-
-
-
- Page 32 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- a "Activates" the partition, i.e. makes it bootable.
- Only one partition can be bootable at a time.
-
- d "Desactivates" the partition, i.e. makes it unbootable.
-
- If no operation is given, the current settings are printed.
-
- For partition creations, the following options are
- available:
-
- s _s_e_c_t_o_r_s
- The number of sectors per track of the partition (which
- is also the number of sectors per track for the whole
- drive).
-
- h _h_e_a_d_s
- The number of heads of the partition (which is also the
- number of heads for the whole drive). By default, the
- geometry information (number of sectors and heads) is
- figured out from neighbouring partition table entries,
- or guessed from the size.
-
- t _c_y_l_i_n_d_e_r_s
- The number of cylinders of the partition (not the
- number of cylinders of the whole drive.
-
- b _b_e_g_i_n
- The starting offset of the partition, expressed in
- sectors. If begin is not given, mpartition lets the
- partition begin at the start of the disk (partition
- number 1), or immediately after the end of the previous
- partition.
-
- l _l_e_n_g_t_h
- The size (length) of the partition, expressed in
- sectors. If end is not given, mpartition figures out
- the size from the number of sectors, heads and
- cylinders. If these are not given either, it gives the
- partition the biggest possible size, considering disk
- size and start of the next partition.
-
- The following option is available for all operation which
- modify the partition table:
-
- f Usually, before writing back any changes to the
- partition, mpartition performs certain consistenct
- checks, such as checking for overlaps and proper
- alignment of the partitions. If any of these checks
- fails, the partition table is not changes. The -f
- allows you to override these safeguards.
-
- The following option is available for all operations:
-
-
-
- Page 33 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- v Together with -p prints the partition table as it is
- now (no change operation), or as it is after it is
- modified.
-
- vv If the verbosity flag is given twice, mpartition will
- print out a hexdump of the partition table when reading
- it from and writing it to the device.
-
- MMMMrrrrdddd
- The mrd command is used to remove an MS-DOS subdirectory.
- Its syntax is:
-
- mrd [-v] _m_s_d_o_s_d_i_r_e_c_t_o_r_y [ _m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s... ]
-
-
- Mrd removes a directory from an MS-DOS filesystem. An error
- occurs if the directory does not exist or is not empty.
-
- MMMMrrrreeeennnn
- The mren command is used to rename or move an existing MS-
- DOS file or subdirectory. Its syntax is:
-
- mren [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e _t_a_r_g_e_t_f_i_l_e
-
-
- Mren renames an existing file on an MS-DOS filesystem.
-
- In verbose mode, Mren displays the new filename if the name
- supplied is invalid.
-
- If the first syntax is used (only one sourcefile), and if
- the target name doesn't contain any slashes or colons, the
- file (or subdirectory) is renamed in the same directory,
- instead of being moved to the current mcd directory as would
- be the case with mmove. Unlike the MS-DOS version of REN,
- mren can be used to rename directories.
-
- MMMMsssshhhhoooowwwwffffaaaatttt
- The mshowfat command is used to display the FAT entries for
- a file. Syntax:
-
- $ mshowfat files
-
-
- MMMMttttoooooooollllsssstttteeeesssstttt
- The mtoolstest command is used to tests the mtools
- configuration files. To invoke it, just type mtoolstest
- without any arguments. Mtoolstest reads the mtools
- configuration files, and prints the cumulative configuration
- to stdout. The output can be used as a configuration file
- itself (although you might want to remove redundant
- clauses). You may use this program to convert old-style
-
-
-
- Page 34 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- configuration files into new style configuration files.
-
- MMMMttttyyyyppppeeee
- The mtype command is used to display contents of an MS-DOS
- file. Its syntax is:
-
- mtype [-ts] _m_s_d_o_s_f_i_l_e [ _m_s_d_o_s_f_i_l_e_s... ]
-
-
- Mtype displays the specified MS-DOS file on the screen.
-
- In addition to the standard options, Mtype allows the
- following command line options:
-
- t Text file viewing. Mtype translates incoming carriage
- return/line feeds to line feeds.
-
- s Mtype strips the high bit from the data.
-
- The mcd command may be used to establish the device and the
- current working directory (relative to MS-DOS), otherwise
- the default is A:/.
-
- Mtype returns 0 on success, 1 on utter failure, or 2 on
- partial failure.
-
- Unlike the MS-DOS version of TYPE, mtype allows multiple
- arguments.
-
- MMMMzzzziiiipppp
- The mzip command is used to issue ZIP disk specific commands
- on Solaris or HPUX. Its syntax is:
-
- mzip [-epqrwx]
-
-
- Mzip allows the following command line options:
-
- e Ejects the disk.
-
- f Force eject even if the disk is mounted (must be given
- in addition to -e).
-
- r Write protect the disk.
-
- w Remove write protection.
-
- p Password write protect.
-
- x Password protect
-
- u Temporarily unprotect the disk until it is ejected.
-
-
-
- Page 35 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- The disk becomes writable, and reverts back to its old
- state when ejected.
-
- q Queries the status
-
- To remove the password, set it to one of the passwordless
- modes -r or -w: mzip will then ask you for the password, and
- unlock the disk. If you have forgotten the password, you
- can get rid of it by low-level formatting the disk (using
- your SCSI adaptor's BIOS setup).
-
- The ZipTools disk shipped with the drive is also password
- protected. On Dos or on a Mac, this password is
- automatically removed once the ZipTools have been installed.
- From various articles posted to Usenet, I learned that the
- password for the tools disk is APlaceForYourStuff. Mzip
- knows about this password, and tries it first, before
- prompting you for a password. Thus mzip -w z: unlocks the
- tools disk. The tools disk is formatted in a special way so
- as to be usable both in a PC and in a Mac. On a PC, the Mac
- filesystem appears as a hidden file named `partishn.mac'.
- You may erase it to reclaim the 50 Megs of space taken up by
- the Mac filesystem.
-
- XXXXccccooooppppyyyy
- The xcopy script is used to recursively copy one directory
- to another. Its syntax is:
-
- xcopy _s_o_u_r_c_e_d_i_r_e_c_t_o_r_y _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
-
-
- If targetdirectory does not exist, it is created. If it
- does exist, the files of sourcedirectory are directly copied
- into it, and no subdirectory called _s_o_u_r_c_e_d_i_r_e_c_t_o_r_y is
- created, unlike with cp -rf.
-
- BBBBuuuuggggssss
- This command is a big kludge. A proper implementation would
- take a rework of significant parts of mtools, but
- unfortunately I don't have the time for this right now. The
- main downside of this implementation is that it is
- inefficient on some architectures (several successive calls
- to mtools, which defeats mtools' caching).
-
- AAAArrrrcccchhhhiiiitttteeeeccccttttuuuurrrreeee ssssppppeeeecccciiiiffffiiiicccc ccccoooommmmppppiiiillllaaaattttiiiioooonnnn ffffllllaaaaggggssss
- To compile mtools, first invoke ./configure before make. In
- addition to the standard autoconfigure flags, there are two
- architecture specific flags available.
-
- ./configure --enable-xdf
- ./configure --disable-xdf
- Enables support for XDF disks. This is on by default.
-
-
-
- Page 36 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- See section XDF, for details.
-
- ./configure --enable-vold
- ./configure --disable-vold
- Enables support for vold on Solaris. When used in
- conjunction with vold, mtools should uses different
- device nodes as for direct access.
-
- ./configure --enable-new-vold
- ./configure --disable-new-vold
- Enables new support for vold on Solaris. This is
- supposed to work more smoothly than the old support.
-
- ./configure --enable-floppyd
- ./configure --disable-floppyd
- Enables support for floppyd. By default, floppyd
- support is enabled as long as the necessary X includes
- and libraries are available.
-
- PPPPoooorrrrttttiiiinnnngggg mmmmttttoooooooollllssss ttttoooo aaaarrrrcccchhhhiiiitttteeeeccccttttuuuurrrreeeessss wwwwhhhhiiiicccchhhh aaaarrrreeee nnnnooootttt ssssuuuuppppppppoooorrrrtttteeeedddd yyyyeeeetttt
- This chapter is only interesting for those who want to port
- mtools to an architecture which is not yet supported. For
- most common systems, default drives are already defined. If
- you want to add default drives for a still unsupported
- system, run config.guess, to see which identification
- autoconf uses for that system. This identification is of the
- form cpu-vendor-os (for example sparc-sun-sunos). The cpu
- and the os parts are passed to the compiler as preprocessor
- flags.
- The OS part is passed to the compiler in three forms.
-
- 1. The complete os name, with dots replaced by
- underscores. sco3.2v2 would yield sco3_2v2
-
- 2. The base os name. Sco3.2v2 would yield Sco
-
- 3. The base os name plus its major version. Sco3.2v2 would
- yield Sco3
-
- All three versions are passed, if they are different.
-
- To define the devices, use the entries for the systems that
- are already present as templates. In general, they have the
- following form:
-
- ####iiiiffff ((((ddddeeeeffffiiiinnnneeeedddd ((((mmmmyyyy____ccccppppuuuu)))) &&&&&&&& ddddeeeeffffiiiinnnneeeedddd((((mmmmyyyy____oooossss))))))))
- ####ddddeeeeffffiiiinnnneeee pppprrrreeeeddddeeeeffffiiiinnnneeeedddd____ddddeeeevvvviiiicccceeeessss
- ssssttttrrrruuuucccctttt ddddeeeevvvviiiicccceeee ddddeeeevvvviiiicccceeeessss[[[[]]]] ==== {{{{
- {{{{ """"////ddddeeeevvvv////ffffiiiirrrrsssstttt____ddddrrrriiiivvvveeee"""",,,, ''''ddddrrrriiiivvvveeee____lllleeeetttttttteeeerrrr'''',,,, ddddrrrriiiivvvveeee____ddddeeeessssccccrrrriiiippppttttiiiioooonnnn}}}},,,,
- ............
- {{{{ """"////ddddeeeevvvv////llllaaaasssstttt____ddddrrrriiiivvvveeee"""",,,, ''''ddddrrrriiiivvvveeee____lllleeeetttttttteeeerrrr'''',,,, ddddrrrriiiivvvveeee____ddddeeeessssccccrrrriiiippppttttiiiioooonnnn}}}}
- }}}}
-
-
-
- Page 37 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- ####ddddeeeeffffiiiinnnneeee IIIINNNNIIIITTTT____NNNNOOOOOOOOPPPP
- ####eeeennnnddddiiiiffff
-
-
-
- "/dev/first_drive" is the name of the device or image file
- representing the drive. Drive_letter is a letter ranging
- from a to z giving access to the drive. Drive_description
- describes the type of the drive:
-
- ED312
- extra density (2.88M) 3 1/2 disk
-
- HD312
- high density 3 1/2 disk
-
- DD312
- double density 3 1/2 disk
-
- HD514
- high density 5 1/4 disk
-
- DD514
- double density 5 1/4 disk
-
- DDsmall
- 8 sector double density 5 1/4 disk
-
- SS514
- single sided double density 5 1/4 disk
-
- SSsmall
- single sided 8 sector double density 5 1/4 disk
-
- GENFD
- generic floppy drive (12 bit FAT)
-
- GENHD
- generic hard disk (16 bit FAT)
-
- GEN generic device (all parameters match)
-
- ZIPJAZ(flags)
- generic ZIP drive using normal access. This uses
- partition 4. Flags are any special flags to be passed
- to open.
-
- RZIPJAZ(flags)
- generic ZIP drive using raw SCSI access. This uses
- partition 4. Flags are any special flags to be passed
- to open.
-
-
-
-
- Page 38 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- REMOTE
- the remote drive used for floppyd. Unlike the other
- items, this macro also includes the file name
- ($DISPLAY) and the drive letter (X)
-
- Entries may be described in more detail:
-
- ffffaaaatttt____bbbbiiiittttssss,,,,ooooppppeeeennnn____ffffllllaaaaggggssss,,,,ccccyyyylllliiiinnnnddddeeeerrrrssss,,,,hhhheeeeaaaaddddssss,,,,sssseeeeccccttttoooorrrrssss,,,,DDDDEEEEFFFF____AAAARRRRGGGG
-
- or, if you need to describe an offset (filesystem doesn't
- start at beginning of filesystem)
-
- ffffaaaatttt____bbbbiiiittttssss,,,, ooooppppeeeennnn____ffffllllaaaaggggssss,,,, ccccyyyylllliiiinnnnddddeeeerrrrssss,,,, hhhheeeeaaaaddddssss,,,, sssseeeeccccttttoooorrrrssss,,,, ooooffffffffsssseeeetttt,,,, DDDDEEEEFFFF____AAAARRRRGGGG0000
-
-
-
- fat_bits
- is either 12, 16 or 0. 0 means that the device accepts
- both types of FAT.
-
- open_flags
- may include flags such as O_NDELAY, or O_RDONLY, which
- might be necessary to open the device. 0 means no
- special flags are needed.
-
- cylinders,heads,sectors
- describe the geometry of the disk. If cylinders is 0,
- the heads and sectors parameters are ignored, and the
- drive accepts any geometry.
-
- offset
- is used if the DOS filesystem doesn't begin at the
- start of the device or image file. This is mostly
- useful for Atari Ram disks (which contain their device
- driver at the beginning of the file) or for DOS
- emulator images (which may represent a partitioned
- device.
-
- Definition of defaults in the devices file should only be
- done if these same devices are found on a large number of
- hosts of this type. In that case, could you also let me know
- about your new definitions, so that I can include them into
- the next release. For purely local file, I recommend that
- you use the /usr/freeware/etc/mtools.conf and ~/.mtoolsrc
- configuration files.
-
- However, the devices files also allows to supply geometry
- setting routines. These are necessary if you want to access
- high capacity disks.
-
- Two routines should be supplied:
-
-
-
-
- Page 39 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- 1. Reading the current parameters
-
- ssssttttaaaattttiiiicccc iiiinnnnlllliiiinnnneeee iiiinnnntttt ggggeeeetttt____ppppaaaarrrraaaammmmeeeetttteeeerrrrssss((((iiiinnnntttt ffffdddd,,,, ssssttttrrrruuuucccctttt ggggeeeennnneeeerrrriiiicccc____ffffllllooooppppppppyyyy____ssssttttrrrruuuucccctttt ****ffffllllooooppppppppyyyy))))
-
-
-
- This probes the current configured geometry, and
- return it in the structure generic_floppy_struct (which
- must also be declared).
- Fd is an open file descriptor for the device, and buf
- is an already filled in stat structure, which may be
- useful.
- This routine should return 1 if the probing fails, and
- 0 otherwise.
-
- 2. Setting new parameters
-
- ssssttttaaaattttiiiicccc iiiinnnnlllliiiinnnneeee iiiinnnntttt sssseeeetttt____ppppaaaarrrraaaammmmeeeetttteeeerrrrssss((((iiiinnnntttt ffffdddd,,,, ssssttttrrrruuuucccctttt ggggeeeennnneeeerrrriiiicccc____ffffllllooooppppppppyyyy____ssssttttrrrruuuucccctttt ****ffffllllooooppppppppyyyy))))
- ssssttttrrrruuuucccctttt ssssttttaaaatttt ****bbbbuuuuffff))))
-
- This configures the geometry contained in floppy on
- the file descriptor fd. Buf is the result of a stat
- call (already filled in). This should return 1 if the
- new geometry cannot be configured, and 0 otherwise.
-
- A certain number of preprocessor macros should also be
- supplied:
-
- TRACKS(floppy)
- refers to the track field in the floppy structure
-
- HEADS(floppy)
- refers to the heads field in the floppy structure
-
- SECTORS(floppy)
- refers to the sectors per track field in the floppy
- structure
-
- SECTORS_PER_DISK(floppy)
- refers to the sectors per disk field in the floppy
- structure (if applicable, otherwise leave undefined)
-
- BLOCK_MAJOR
- major number of the floppy device, when viewed as a
- block device
-
- CHAR_MAJOR
- major number of the floppy device, when viewed as a
- character device (a.k.a. "raw" device, used for fsck)
- (leave this undefined, if your OS doesn't have raw
- devices)
-
-
-
-
- Page 40 (printed 7/15/98)
-
-
-
-
-
-
- mmmmttttoooooooollllssss....1111((((3333)))) MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777)))) mmmmttttoooooooollllssss....1111((((3333))))
-
-
-
- For the truly high capacity formats (XDF, 2m, etc), there
- is no clean and documented interface yet.
-
- SSSSeeeeeeee aaaallllssssoooo
- mattrib mbadblocks mcd mcopy mdel mdeltree mdir mdu mformat
- mkmanifest mlabel mmd mmount mmove mrd mread mren mtoolstest
- mtype
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 41 (printed 7/15/98)
-
-
-
-